#include <stdio.h>
#include <stdlib.h>

#include <acl/acl.h>

#define FROM_DEVICE 0
#define TO_DEVICE 1

#define DATA_SIZE (1ULL << 29) // 1GB

#define WARMUP_ITERATIONS 10
#define MEASURED_ITERATIONS 10

#define ACL_CHECK(call) \
    do { \
        aclError err = (call); \
        if (err != ACL_SUCCESS) { \
            fprintf(stderr, "\033[31m[ACL ERROR]\033[0m " \
                      "File: %s:%d\n" \
                      "Function: %s\n" \
                      "Error Code: %d\n", __FILE__, __LINE__, #call, err); \
            exit(EXIT_FAILURE); \
        } \
    } while(0)
